package com.hbnu.comment.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 评论表对象 yz_comment
 * 
 * @author ruoyi
 * @date 2025-05-28
 */
public class Comment extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 评论id */
    @Excel(name = "评论id")
    private Long id;

    /** 评论者id */
    @Excel(name = "评论者id")
    private Long userId;

    /** 视频id */
    @Excel(name = "视频id")
    private Long videoId;

    /** 评论内容 */
    @Excel(name = "评论内容")
    private String content;

    /** 父评论id */
    @Excel(name = "父评论id")
    private Long parentCommentId;

    /** 评论时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "评论时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setVideoId(Long videoId) 
    {
        this.videoId = videoId;
    }

    public Long getVideoId() 
    {
        return videoId;
    }

    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }

    public void setParentCommentId(Long parentCommentId) 
    {
        this.parentCommentId = parentCommentId;
    }

    public Long getParentCommentId() 
    {
        return parentCommentId;
    }

    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("videoId", getVideoId())
            .append("content", getContent())
            .append("parentCommentId", getParentCommentId())
            .append("createdAt", getCreatedAt())
            .toString();
    }
}
